import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm'
import { BaseEntity } from './BaseEntity'
import { DateEntity } from './DateEntity'

// 业扩物资入库明细表
@Entity({ name: 't_in_storage_details' })
export class InventoryDetails extends BaseEntity {
  // 管理合同编码过来
  @Column({ name: 'contract_id', type: 'text', comment: '合同id' })
  contractId: string

  @Column({ name: 'material_name', type: 'text', comment: '物资名称' })
  materialName: string

  @Column({ name: 'material_model', type: 'text', comment: '物资型号' })
  materialModel: string

  @Column({ name: 'unit', type: 'text', comment: '单位' })
  unit: string

  @Column({ name: 'in_storage_num', type: 'integer', comment: '入库数量' })
  inStorageNum: string

  @Column({ name: 'in_storage_time', type: 'text', comment: '入库时间' })
  inStorageTime: string

  @Column({ name: 'out_storage_num', type: 'integer', comment: '出库数量' })
  outStorageNum: string

  @Column({ name: 'out_storage_time', type: 'text', comment: '出库时间' })
  outStorageTime: string

  @Column({ name: 'project_name', type: 'text', comment: '工程名称' })
  projectName: string

  @Column({ name: 'surplus_num', type: 'integer', comment: '剩余数量' })
  surplusNum: string

  @Column({ name: 'purveyor', type: 'text', comment: '供货厂家' }) // 扩展公司表
  purveyor: string

  @Column({ name: 'remark', type: 'text', comment: '备注' })
  remark: string

  @Column((type) => DateEntity)
  '': DateEntity
}
